import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
// 导入懒加载
import VueLazyload from "vue-lazyload";
// 为了一劳永逸，省去后面频繁导入axios，此处可以进行优化
import axios from "@/api/http";
// 核心思想：将axios放到vue的原型上，起名属性：$http
Vue.prototype.$http = axios;

// 使用懒加载指定图片
Vue.use(VueLazyload, {
    loading: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.lgpc.com.cn%2F1%2Fimg%2Ftime.gif&refer=http%3A%2F%2Fwww.lgpc.com.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1627874508&t=e726a0c4aeab3d62e454a2f98ce9fb33",
});

Vue.config.productionTip = false;

new Vue({
    router,
    store,
    render: (h) => h(App),
}).$mount("#app");
